package com.zb.zeus.common.core.autoconfig;

import com.zb.zeus.common.core.web.filter.RequestNumFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;

/**
 * @author fujianjian
 * @date 2022/5/9 17:02
 **/
public class ZeusAutoConfiguration {

    @Bean
    public FilterRegistrationBean<RequestNumFilter> zeusRequestNumFilter() {
        FilterRegistrationBean<RequestNumFilter> registrationBean = new FilterRegistrationBean<>();

        registrationBean.setFilter(new RequestNumFilter());
        registrationBean.addUrlPatterns("/*");
        registrationBean.setName("zuesRequestNumFilter");
        registrationBean.setOrder(Integer.MAX_VALUE);
        return registrationBean;
    }
}
